home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
CC_C
/
0574.ZIP
/
RDWR.ASM
< prev
next >
Wrap
Assembly Source File
|
1986-11-20
|
567b
|
39 lines
include compiler.inc
ttl RDRW, 1.04, 08-30-86, clr
;low-level interface to DOS
dseg
exterr
cseg
procdef read, <<handl, word>, <buffr, ptr>, <count, word>>
push di
mov di,3f00h ;save read function value
jmp short start
entrdef write
push di
mov di,4000h ;save write function value
start:
xor ax,ax
moverr ax ;blank _errcod first
mov bx,handl ; handle
pushds
ldptr dx,buffr,ds ; buffer
mov cx,count ; count
mov ax,di
int 21h
popds
jnc fini
moverr ax
mov ax,-1
fini:
pop di
pret
pend read
finish